home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Format 2004 Junue - Disc 1
/
MacFormat 143 CD1.iso
/
Serious Software
/
RealCADD3.05.sit
/
RealCADD3.05
/
scripts
/
reppoutre
< prev
next >
Wrap
Text File
|
2003-04-11
|
2KB
|
97 lines
RCAD script
1.00
reppoutre
Textbulleup
Textbulledown
3
0
1
1er n°
Font
Size
1
Helvetica
18
Dim s_angle, s_dx, s_dy, s_Pi as double
Dim s_TSize, s_TPoly as integer
s_Pi = 3.141592654
s_dx = lastx - firstx
s_dy = lasty - firsty
s_TSize = val(UserInput3)
s_TPoly = round(s_TSize * 1.1)
if s_dx <> 0 then
s_angle = abs(Atan(s_dy / s_dx)) * 180 / s_Pi
if s_dx >= 0 then
if s_dy < 0 then
s_angle = 360 - s_angle
end if
else
if s_dy > 0 then
s_angle = 180 - s_angle
else
s_angle = 180 + s_angle
end if
end if
else
if s_dy = 0 then
s_angle = 0
else
if s_dy > 0 then
s_angle = 90
else
s_angle = 270
end if
end if
end if
if GlobalScript1 < 0 then
GlobalScript1 = val(UserInput1)
else
GlobalScript1 = GlobalScript1 + 1
end if
Add_Polygon(firstx, firsty, 0.35, 7, 0, False, False)
if (s_angle < 45) or (s_angle > 315) then
Add_PointToPolygon(firstx + s_TPoly, firsty - s_TPoly)
Add_PointToPolygon(firstx + s_TPoly * 2, firsty)
Add_PointToPolygon(firstx + s_TPoly, firsty + s_TPoly)
Add_PointToPolygon(firstx, firsty)
Add_String(Str(GlobalScript1),firstx+s_TPoly,firsty+s_TPoly/3,s_TSize,1,false,false,false,7,0,UserInput3,false,false,0)
elseif s_angle < 135 then
Add_PointToPolygon(firstx + s_TPoly, firsty + s_TPoly)
Add_PointToPolygon(firstx, firsty + s_TPoly * 2)
Add_PointToPolygon(firstx - s_TPoly, firsty + s_TPoly)
Add_PointToPolygon(firstx, firsty)
Add_String(Str(GlobalScript1),firstx,firsty+s_TPoly*1.33,s_TSize,1,false,false,false,7,0,UserInput3,false,false,0)
elseif s_angle < 225 then
Add_PointToPolygon(firstx - s_TPoly, firsty + s_TPoly)
Add_PointToPolygon(firstx - s_TPoly * 2, firsty)
Add_PointToPolygon(firstx - s_TPoly, firsty - s_TPoly)
Add_PointToPolygon(firstx, firsty)
Add_String(Str(GlobalScript1),firstx-s_TPoly,firsty+s_TPoly/3,s_TSize,1,false,false,false,7,0,UserInput3,false,false,0)
else
Add_PointToPolygon(firstx - s_TPoly, firsty - s_TPoly)
Add_PointToPolygon(firstx, firsty - s_TPoly * 2)
Add_PointToPolygon(firstx + s_TPoly, firsty - s_TPoly)
Add_PointToPolygon(firstx, firsty)
Add_String(Str(GlobalScript1),firstx,firsty-s_TPoly+s_TPoly/3,s_TSize,1,false,false,false,7,0,UserInput3,false,false,0)
end if